import { createSlice } from "@reduxjs/toolkit";

interface IState {
  msg: string;
}
const initialState: IState = {
  msg: "dd",
};
const counterSlice = createSlice({
  name: " counter",
  initialState,
  reducers: {
    changeCounter(state, { payload }) {
      state.msg = payload;
    },
  },
});

export const { changeCounter } = counterSlice.actions;
export default counterSlice.reducer;
